Ext.define('appmod.view.file.FileForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.fileform',
    bodyPadding: 10,
	
    initComponent: function() {
      var me = this;
	  
	  var required = '<span style="color:red;font-weight:bold" data-qtip="Required">*</span>';

    Ext.apply(Ext.form.field.VTypes, {
        password: function(val, field) {
            if (field.initialPassField) {
				var pwd = field.up('form').down('#' + field.initialPassField);
				
                return (val == fitname.getValue());
            }
            return true;
        },

        passwordText: '文件格式名不匹配'
    }); 

      Ext.applyIf(me, {
	  	    fieldDefaults: {
            	labelWidth: 80
        	},
            items: [
                {
                    xtype: 'textfield',
                    name: 'name',
                    fieldLabel: '分类名称',
					anchor: '95%',
					allowBlank:false
                },
                {
                    xtype: 'textfield',
                    name: 'fitname',
                    anchor: '95%',
					fieldLabel: '分类文件格式名'
                }					
            ]			
        });
        me.callParent(arguments);
    }
});